<template>
    <el-form :inline="true">
      <!-- 表单元素 -->
            <el-row>
                <el-col :span="111">
                    <el-form-item label="资产编号">
                        <el-input  size="mini" v-model="searchObj.assets_no" placeholder="资产编号编号"/>
                    </el-form-item>
                </el-col>
                <el-col :span="111">
                    <el-form-item label="序列号">
                        <el-input  size="mini" v-model="searchObj.serial_no" placeholder="仪器序列号"/>
                    </el-form-item>
                </el-col>
                <el-col :span="111">
                    <el-form-item label="使用科室">
                        <el-select v-model="searchObj.assets_dep" size="mini" placeholder="查询科室">
                            <el-option
                              v-for="item in this.$store.state.dep_options"
                              :key="item.id"
                              :label="item.dep_name"
                              :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="111">
                    <el-form-item label="管理科室">
                        <el-select v-model="searchObj.assets_manage_dep" size="mini" placeholder="管理科室">
                            <el-option
                              v-for="item in this.$store.state.dep_options"
                              :key="item.id"
                              :label="item.dep_name"
                              :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="111">
                    <el-form-item label="资产类型">
                        <el-select v-model="searchObj.assets_type" size="mini" placeholder="资产类型">
                            <el-option
                              v-for="item in this.$store.state.type_options"
                              :key="item.id"
                              :label="item.type_name"
                              :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
              </el-row>  
              <el-row>
                <el-col :span="111">
                    <el-form-item label="注册时间">
                        <el-date-picker
                          size="mini"
                          v-model="searchObj.assets_time"
                          type="daterange"
                          start-placeholder="开始日期"
                          end-placeholder="结束日期"
                          value-format="yyyy-MM-dd"
                          style="width:80%"
                          >
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                 <el-col :span="111">
                    <el-form-item label="报废时间">
                        <el-date-picker
                          size="mini"
                          v-model="searchObj.scrap_time"
                          type="daterange"
                          start-placeholder="开始日期"
                          end-placeholder="结束日期"
                          value-format="yyyy-MM-dd"
                          style="width:80%"
                          >
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="111">
                    <el-button type="primary" size="small" icon="el-icon-search" @click="Search()">查询</el-button>
                    <el-button type="default" size="small" @click="ClearSearch()">清空</el-button>
                    
                </el-col>
                <el-col :span="111" :push="1">
                  <el-switch
                    v-model="searchObj.isscrap"
                    active-text="只看报废"
                    inactive-text="查看所有">
                  </el-switch>
                </el-col>
            </el-row>            
        </el-form>
</template>
<script>
export default {
    name:"AssetlistHead",
    data(){
        return {
            searchObj:{
            assets_no:"",//资产编号
            serial_no:"",//资产序列号
            assets_dep:"",//资产使用科室
            assets_manage_dep:"",//管理科室
            assets_type:"",//资产类型
            assets_time:"",//注册时间
            scrap_time:"",//报废时间
            isscrap:false//标记是否只看报废
          }//查询的对象
        }
    },
    methods:{
        //清空
        ClearSearch(){
            
        },
        search(){
            this.$bus.$emit("Search");
        }
    }
}
</script>
<style>

</style>